using System;
using System.Data; 
 using System.Collections.Generic; 
using System.Data.SqlClient;
using Core;

 namespace DataAccess
{
	public class tbLink_Proxy 
	{
 log4net.ILog log = log4net.LogManager.GetLogger("tbLink");	 Popular cur = new tbLink();
  public  bool Insert_tbLink_Proxy(Popular cn) {
 bool kq = true;
 try {
 kq= cur.Insert(cn); 
 }
     catch (Exception) 
 {  kq= false;
}
   if(kq)
   log.Info(" form tbLink insert success");
  else
     log.Info("form tbLink insert fail");
   return kq;
 }
 public  bool Update_tbLink_Proxy(Popular cn) {
 bool kq = true;
 try {
 kq= cur.Update(cn); 
 }
 catch (Exception) { kq= false;} 
   if(kq)
   log.Info(" form tbLink update success");
  else
     log.Info("form tbLink update fail");
   return kq;
 }
 public  bool Delete_tbLink_Proxy(object b){
 bool kq = true;
 try {
 kq= cur.Delete(b); 
 }
 catch (Exception){kq= false;} 
   if(kq)
   log.Info(" form tbLink delete success");
  else
     log.Info("form tbLink delete fail");
   return kq;
 }
 public IDataReader GetById_tbLink_Proxy(object b){
   log.Info(" form tbLink Search by Id");
     try   { return cur.Select_ID(b);}
  catch (Exception) {throw; }
}
      public IDataReader GetByName_tbLink_Proxy(object b) {
   log.Info(" form tbLink Search by Name");
             return cur.Select_Name(b);}
 public IDataReader SelectNo_tbLink_Proxy(object b) {
   log.Info(" form tbLink Search ");
 if (ConvertType.ToInt(b) != 0)
 return cur.Select_ID(b);
 return cur.Select_Name(b);}
 public IDataReader SelectAll_tbLink_Proxy(){
   log.Info(" form tbLink Load data");
 try {  return cur.SelectAll(); }
 catch (Exception)  {  throw;  } 
 } 
 public List<tbLink> SelectAlltbLink_Proxy(){
 tbLink kh = new tbLink();
 return kh.SelectAllToList();
} } }